package com.central.scheduler.api.service;

import com.central.common.model.*;
import com.central.common.service.ISuperService;
import com.central.scheduler.common.utils.SnowFlakeUtils;

import java.util.Map;

/**
 * @author Tindy
 * @date 2021/7/3
 * @describe
 */
public interface ITaskDefinitionService extends ISuperService<TaskDefinition> {
    void release(TaskDefinition taskDefinition);

    PageResult<TaskDefinition> findTasks(Long proId, Map<String, Object> params);

    Result tmpRunTask(SysUser user, TaskDefinition taskDefinition) throws SnowFlakeUtils.SnowFlakeException;

    Long taskIsRelease(Long taskDefinedId, Long taskDefinedLogId);

    Result delTask(SysUser user, Long id);
}